/**
 * @file Define the base handler class for wechat message handlers
 * 
 * @author Steve Gao<gaofu@parllay.com>
 */
const DefaultReplyMessages = require('../../constants').DefaultWeChatReplyMessage;
/**
 * The base WeChat message handler
 * 
 * @class BaseWeChatHandler
 * @param {WeChatService} service
 */
class BaseWeChatHandler {



    get Service() {
        return this._Service;
    }

    constructor(service) {
        this._Service = service;
    }

    /**
     * Handle the normal WeChat message for WeChat user
     * 
     * @name handleWeChatBillboardMessage
     * @param {String} fromUser - The official account's id
     * @param {String} toUser - The recipient's openId 
     * @param {String} msgType - The message type
     * @param {Object} message - The parsed message XML object
     * @param {Object} params - The parameters passed by WeChat
     * @param {Function} parentCallback - The callback function
     * 
     * @returns {void}
     */
    handleMessage(fromUser, toUser, msgType, message, params, parentCallback){
        parentCallback(DefaultReplyMessages.SUCCESS);
    }
}